<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <style>
    .slide {
      height: 400px;
      width: 400px;
      position: relative;
      overflow: hidden;
      background-size: cover;
      background-position: center;
      margin: 0 auto;
      animation: slide 20s linear infinite;
    }

    @keyframes slide {
      0% {
        background-image: url("https://picsum.photos/400/400?random=1");
        background-color: aqua;
      }
      25% {
        background-image: url("https://picsum.photos/400/400?random=2");
        background-color: blue;
      }
      50% {
        background-image: url("https://picsum.photos/400/400?random=3");
        background-color: green;
      }
      75% {
        background-image: url("https://picsum.photos/400/400?random=4");
        background-color: yellow;
      }
      100% {
        background-image: url("https://picsum.photos/400/400?random=5");
        background-color: red;
      }
    }
  </style>
</head>
<body>
  <div class="slide">

  </div>
  <br/>
  
</body>
</html>